
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <style>
     
    </style>
</head>
<body>
  <input type="text"></br>
  <input type="text"></br>
  <input type="text"></br>
  <input type="text"></br>
  <input type="text"></br>
    <script>
      var inputs = document.getElementsByTagName('input');

      for (var i = 0; i < inputs.length; i++)
      {
            inputs[i].onfocus = function(){
              for (var j = 0; j < inputs.length; j++)
              {
                    inputs[j].style.backgroundColor = "";
              }
            this.style.backgroundColor = "yellow";
            }
      }
    </script>
</body>
</html>
